package com.xdjd.task.job;

import com.xdjd.task.service.ChallengeService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHandler;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@JobHandler(value = "settleChallengeJob")//晚上十点执行
@Component
public class SettleChallengeJob extends IJobHandler {

    @Autowired
    private ChallengeService challengeService;


    @Override
    public ReturnT<String> execute(String s) throws Exception {
        challengeService.settleChallenge();
        return SUCCESS;
    }
}
